//
//  UserServices.h
//  Les
//
//  Created by 朱亮亮 on 14-11-4.
//  Copyright (c) 2014年 朱 亮亮. All rights reserved.
//

#import "BMNetWorkURLs.h"

@class UserModel;

@interface UserServices : NSObject

+ (void)showErrorMsg:(NSInteger)msgCode;


#pragma mark - 登录

/**
 *  1、	门店登录
 *
 *  @param username           用户名
 *  @param pass               密码
 *  @param completionBlock 回调
 */
+ (void)loginByUsername:(NSString *)username
                   pass:(NSString *)pass
        completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
 *  2、	注销登录
 *
 *  @param token           身份令牌
 *  @param completionBlock 回调
 */
+ (void)unloginByToken:(NSString *)token
       completionBlock:(void (^)(int result, id responseObject))completionBlock;


#pragma mark - 门店签约

/**
 *  门店签约审核1 - 列表
 *
 *  @param token           身份令牌<Must>
 *  @param pageSize        分页查询条数<Must>
 *  @param page            当前页码<Must>
 *  @param sign            签约状态
 *  @param name            申请人名称
 *  @param servicer        渠道编码
 *  @param completionBlock 回调
 */
+ (void)auditByToken:(NSString *)token
            pageSize:(NSString *)pageSize
                page:(NSString *)page
                sign:(NSString *)sign
                name:(NSString *)name
            servicer:(NSString *)servicer
     completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
 *  信息列表
 *
 *  @param token           身份令牌<Must>
 *  @param pageSize        分页查询条数<Must>
 *  @param page            当前页码<Must>
 *  @param sign            签约状态
 *  @param name            申请人名称
 *  @param servicer        渠道编码
 *  @param completionBlock 回调
 */
+ (void)getAuditListByToken:(NSString *)token
                   pageSize:(NSString *)pageSize
                       page:(NSString *)page
                       sign:(NSString *)sign
                       name:(NSString *)name
                   servicer:(NSString *)servicer
            completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
 *  门店签约信息列表 详情
 *
 *  @param id             审核对象id
 *  @param token
 *  @param completionBlock 回调
 */
+ (void)getAuditListByToken:(NSString *)token
                         id:(NSString *)id
            completionBlock:(void (^)(int result, id responseObject))completionBlock;


/**
 *  门店签约审核2 详情
 *
 *  @param id             审核对象id
 *  @param token
 *  @param completionBlock 回调
 */
+ (void)auditBytoken:(NSString *)token
                  id:(NSString *)id
     completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
 *  门店签约审核3 审核通过
 *
 *  @param id             审核门店ID
 *  @param status         通过：status=pass不通过：status=reject
 *  @param token
 *  @param completionBlock 回调
 */
+ (void)auditOptBytoken:(NSString *)token
                     id:(NSString *)id
                 status:(NSString *)status
        completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
 *  门店签约审核4 驳回原因提交请求
 *
 *  @param id             审核门店ID
 *  @param status         通过：status=pass不通过：status=reject
 *  @param reson          驳回原因
 *  @param token
 *  @param completionBlock 回调
 */
+ (void)auditResonOptBytoken:(NSString *)token
                          id:(NSString *)id
                      status:(NSString *)status
                       reson:(NSString *)reson
             completionBlock:(void (^)(int result, id responseObject))completionBlock;


/**
 *  号池列表请求
 *
 *  @param servicer 渠道经理编码
 *  @param completionBlock 回调
 */
+ (void)getNumPoolListByToken:(NSString *)token
                     servicer:(NSString *)servicer
                         page:(NSString *)page
                     pagesize:(NSString *)pagesize
              completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
 *  号池添加请求数据
 *
 */
+ (void)getNumPoolAddByToken:(NSString *)token
             completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
 *  号池添加请求
 *
 */
+ (void)addNumPoolByMobile:(NSString *)mobile
                  servicer:(NSString *)servicer
                     token:(NSString *)token
           completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
 *  号池修改请求数据
 *
 */
+ (void)getNumPoolEditByToken:(NSString *)token
                       poolId:(NSString *)poolId
              completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
 *  号池修改请求
 *
 */
+ (void)editNumPoolByMobile:(NSString *)mobile
                   servicer:(NSString *)servicer
                      token:(NSString *)token
                     poolId:(NSString *)poolId
            completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
 *  删除号池请求
 *
 */
+ (void)deletePoolByToken:(NSString *)token
                   poolId:(NSString *)poolId
          completionBlock:(void (^)(int result, id responseObject))completionBlock;


/**
 *  消息处理列表请求
 *
 *  @param title 搜索的内容
 */
+ (void)getMsgListByToken:(NSString *)token
                    title:(NSString *)title
                     page:(NSString *)page
                 pagesize:(NSString *)pagesize
          completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
 *  消息推送目标list
 *
 *  @param title 搜索的内容
 */
+ (void)getMsgPushList:(NSString *)token
       completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
 *  消息推送目标list
 *
 *  @param title 搜索的内容
 */
+ (void)getMsgEditPushList:(NSString *)token
                     msgId:(NSString *)msgId
           completionBlock:(void (^)(int result, id responseObject))completionBlock;


/**
 *  编辑消息请求
 *
 */
+ (void)editMsgByToken:(NSString *)token
                 msgId:(NSString *)msgId
               recUser:(NSString *)recUser
               message:(NSString *)message
                 title:(NSString *)title
       completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
 *  新建消息请求
 *
 */
+ (void)newMsgByToken:(NSString *)token
              recUser:(NSString *)recUser
              message:(NSString *)message
                title:(NSString *)title
      completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
 *  删除消息请求
 *
 */
+ (void)deleteMsgByToken:(NSString *)token
                   msgId:(NSString *)msgId
         completionBlock:(void (^)(int result, id responseObject))completionBlock;


/**
 *  工单处理 1  列表请求
 *
 *  @param token YES token
 *  @param id    NO 指定查询的id(工单号)
 *  @param sign  NO 工单处理状态
 *  @param type  NO 工单类型
 */
+ (void)orderAuditListByToken:(NSString *)token
                           id:(NSString *)id1
                         sign:(NSString *)sign
                         type:(NSString *)type
                         page:(NSString *)page
                     pageSize:(NSString *)pageSize
                   showDialog:(BOOL)showDialog
              completionBlock:(void (^)(int result, id responseObject))completionBlock;


/**
*  工单处理 2  信息确认(详情信息)
*
*  @param token YES token
*  @param id    YES 指定查询的id(工单号)
*  @param sign  NO 工单处理状态
*  @param type  NO 工单类型
*/
+ (void)orderAuditDetailByToen:(NSString *)token
                            id:(NSString *)id1
                          sign:(NSString *)sign
                          type:(NSString *)type
                    showDialog:(BOOL)showDialog
               completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
*  工单处理 3  确认提交请求
*
*  @param token      YES token
*  @param id         YES id 详情数据的id
*  @param basicId    YES basicId 工单的orderID
*  @param sjAmount   NO 实际数量
*/
+ (void)orderAuditConfirmSjAmoutByToken:(NSString *)token
                                     id:(NSString *)id
                                basicId:(NSString *)basicId
                               sjAmount:(NSString *)sjAmount
                             showDialog:(BOOL)showDialog
                        completionBlock:(void (^)(int result, id responseObject))completionBlock;

// 同上 号卡情况;手机号码用,风格
+ (void)orderAuditConfirmHaoKaByToken:(NSString *)token
                               mobile:(NSString *)mobile
                                   id:(NSString *)id1
                              basicId:(NSString *)basicId
                           showDialog:(BOOL)showDialog
                      completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
*  工单处理 4  工单审核请求
*
*  @param token YES token
*  @param id    YES 指定查询的id(工单号)
*  @param sign  NO 工单处理状态
*  @param type  NO 工单类型
*/
+ (void)orderAuditDetailByToen:(NSString *)token
                            id:(NSString *)id1
                    showDialog:(BOOL)showDialog
               completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
*  工单处理 5  工单审核提交
*
*  @param token      YES token
*  @param id         YES id 详情数据的id
*  @param basicId    YES basicId 工单的orderID
*  @param status     YES 审核操作类型(status=pass 审核通过提交;status=reject 审核驳回提交;status=reson 审核驳回原因提交)
*  @param reson      NO status=reson 该参数有值
*/
+ (void)orderAuditOpttByToken:(NSString *)token
                           id:(NSString *)id
                      basicId:(NSString *)basicId
                       status:(NSString *)status
                        reson:(NSString *)reson
                   showDialog:(BOOL)showDialog
              completionBlock:(void (^)(int result, id responseObject))completionBlock;


/**
*  工单处理 6  审核驳回原因提交请求 (参数同3)
*
*  @param token      YES token
*  @param id         YES id 详情数据的id
*  @param basicId    YES basicId 工单的orderID
*  @param sjAmount   NO 实际数量
*/
+ (void)orderAuditOptByToken:(NSString *)token
                          id:(NSString *)id
                     basicId:(NSString *)basicId
                    sjAmount:(NSString *)sjAmount
                  showDialog:(BOOL)showDialog
             completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
*  工单处理 7  工单发货确认请求
*
*  @param token YES token
*  @param id    YES 指定查询的id(工单号)
*  @param sign  NO 工单处理状态
*  @param type  NO 工单类型
*/
+ (void)orderAuditFahuoByToen:(NSString *)token
                           id:(NSString *)id1
                   showDialog:(BOOL)showDialog
              completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
*  工单处理 8  工单发货提交请求
*
*  @param token         YES token
*  @param id            YES id 详情数据的id
*  @param basicId       YES basicId 工单的orderID
*  @param opt           YES 发货操作类型(opt=fahuo  提交发货确认页面转向快递信息录入页面 opt=sub  提交快递信息)
*  @param expressName   NO  快递名称
*  @param expressNum    快递单号
*  @param expressRemark sendType
*  @param sendType      快递单号
*/
+ (void)orderAuditOptByToken:(NSString *)token
                     basicId:(NSString *)basicId
                         opt:(NSString *)opt
                 expressName:(NSString *)expressName
                  expressNum:(NSString *)expressNum
               expressRemark:(NSString *)expressRemark
                    sendType:(NSString *)sendType
                  showDialog:(BOOL)showDialog
             completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
 *  工单处理 9  号段筛选号池号卡请求 (当前用户拥有的)
 *
 *  @param token     YES token
 *  @param segment   YES 号段
 */
+ (void)orderAuditGetPoolsByToken:(NSString *)token
                          segment:(NSString *)segment
                       showDialog:(BOOL)showDialog
                  completionBlock:(void (^)(int result, id responseObject))completionBlock;


#pragma mark  工单列表(工单管理)

/**
 *  工单列表 1  列表请求
 *
 *  @param token YES token
 *  @param id    NO 指定查询的id(工单号)
 *  @param sign  NO 工单处理状态
 *  @param type  NO 工单类型
 */
+ (void)orderListByToken:(NSString *)token
                      id:(NSString *)id1
                    sign:(NSString *)sign
                    type:(NSString *)type
                    page:(NSString *)page
                pageSize:(NSString *)pageSize
              showDialog:(BOOL)showDialog
         completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
*  工单预览请求 2  工单预览请求（type=5||type=6）
*
*  @param token YES token
*  @param id    YES 指定查询的id(工单号)
*  @param sign  NO 工单处理状态
*  @param type  NO 工单类型
*/
+ (void)orderDetail1ByToken:(NSString *)token
                         id:(NSString *)id1
                       sign:(NSString *)sign
                       type:(NSString *)type
                 showDialog:(BOOL)showDialog
            completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
*  工单预览请求 2  工单预览请求（type!=5&&type!=6）
*
*  @param token YES token
*  @param id    YES 指定查询的id(工单号)
*  @param sign  NO 工单处理状态
*  @param type  NO 工单类型
*/
+ (void)orderDetail2ByToken:(NSString *)token
                         id:(NSString *)id1
                       sign:(NSString *)sign
                       type:(NSString *)type
                 showDialog:(BOOL)showDialog
            completionBlock:(void (^)(int result, id responseObject))completionBlock;

#pragma mark  ------- 后台业务处理--------------------

/**
 *  后台业务处理 1  后台列表请求
 *
 *  @param token      YES token
 *  @param title      NO  消息标题
 *  @param recUserId  NO  接收者
 *  @param userId     NO  发送者
 *  @param page       NO  当前页码  1
 *  @param pagesize   NO  查询条数  5
 */
+ (void)blackListByToken:(NSString *)token
                   title:(NSString *)title
               recUserId:(NSString *)recUserId
                  userId:(NSString *)userId
                    page:(NSString *)page
                pageSize:(NSString *)pageSize
              showDialog:(BOOL)showDialog
         completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
 *  后台业务处理 2  	后台处理请求
 *
 *  @param token      YES token
 *  @param id         YES  后台业务id
 *  @param backId     YES  后台业务创建时的回话Id(gdId)
 */
+ (void)blackDealToken:(NSString *)token
                    id:(NSString *)id
                backId:(NSString *)backId
            showDialog:(BOOL)showDialog
       completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
 *  后台业务处理 3  	后台处理请求
 *
 *  @param token      YES token
 *  @param id         YES  后台业务id
 *  @param backId     YES  后台业务创建时的回话Id(gdId)
 *  @param recUserId  YES  接收人
 *  @param reTitle    YES  标题
 *  @param message    YES  处理内容
 */
+ (void)blackDealToken:(NSString *)token
                    id:(NSString *)id
                backId:(NSString *)backId
             recUserId:(NSString *)recUserId
               reTitle:(NSString *)reTitle
               message:(NSString *)message
            showDialog:(BOOL)showDialog
       completionBlock:(void (^)(int result, id responseObject))completionBlock;

/**
 *  后台业务处理 3  	后台业务预览
 *
 *  @param token      YES token
 *  @param id         YES  后台业务id
 *  @param backId     YES  后台业务创建时的回话Id(gdId)
 */
+ (void)blackViewToken:(NSString *)token
                    id:(NSString *)id
                backId:(NSString *)backId
            showDialog:(BOOL)showDialog
       completionBlock:(void (^)(int result, id responseObject))completionBlock;


@end

